#include "processBar.h"
#include<unistd.h>

typedef void (*callback_t)(int);

void downLode(callback_t cb)
{
  int total=1000,curr=0;
  while(curr<total)
  {
    usleep(50000);
    int rate=curr*100/total;
    cb(rate);
    curr+=10;
  }
  printf("\n");
}

int main()
{
  downLode(processbar);

  return 0;
}
